<?php

declare(strict_types=1);

namespace App\JsonRpc\Service;

use App\JsonRpc\Interface\DataServiceInterface;
use Hyperf\RpcServer\Annotation\RpcService;

#[RpcService(name: 'DataService', server: 'jsonrpc-http', protocol: 'jsonrpc-http', publishTo: 'nacos')]
class DataService implements DataServiceInterface
{
    /**
     * 获取校区列表.
     */
    public function getCampuses(array $data): array
    {
        return ['name' => 'hyperf!', 'responseId' => $data['requestId']];
    }

}
